<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>Signin Template for Bootstrap</title>
		<!-- Bootstrap core CSS -->
		<!--视频34 尚硅谷_SpringBoot_web开发-【实验】-引入资源,其他公用的css等也改为webjar引入-->
		<!-- Bootstrap core CSS 这里用webjar引入 @语法的另一个好处是如果项目名发生改变,会自动加上-->
		<link href="asserts/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.3.1/css/bootstrap.css}" rel="stylesheet">

		<!-- Custom styles for this template -->
		<!-- 注意静态文件的路径th表达式一定要从 / 开始,否则模板引擎可能找不到文件 -->
		<!-- 如密码错误转发回来的时候会拼成: http://localhost:8080/crud/user/asserts/css/signin.css -->
		<link href="asserts/css/signin.css" th:href="@{/asserts/css/signin.css}" rel="stylesheet">
		<!--favicon.ico还要在这里设置下,如果是thymeleaf的话-->
		<link rel="shortcut icon" th:href="@{/favicon.ico}"/>
		<link rel="bookmark" th:href="@{/favicon.ico}"/>
	</head>

	<body class="text-center">
	<form class="form-signin" action="dashboard.html" th:action="@{/user/login}" method="post">
		<img class="mb-4" th:src="@{/asserts/img/bootstrap-solid.svg}" src="asserts/img/bootstrap-solid.svg" alt="" width="72" height="72">
		<!--视频35 尚硅谷_SpringBoot_web开发-【实验】-国际化, 使用#{login.tip}的形式获取国际化配置-->
		<h1 class="h3 mb-3 font-weight-normal" th:text="#{login.tip}">Please sign in</h1>
		<!--视频36 尚硅谷_SpringBoot_web开发-【实验】-登陆&拦截器 显示登陆失败提示-->
		<p style="color: red" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
		<label class="sr-only" th:text="#{login.username}">Username</label>
		<input type="text" class="form-control" name="username" placeholder="Username" th:placeholder="#{login.username}" required="" autofocus="">
		<label class="sr-only" th:text="#{login.password}">Password</label>
		<input type="password" class="form-control" name="password" placeholder="Password" th:placeholder="#{login.password}" required="">
		<div class="checkbox mb-3">
			<label>
				<!--用行内表达式获取国际化-->
				<input type="checkbox" value="remember-me">[[#{login.remember}]]
			</label>
		</div>
		<button class="btn btn-lg btn-primary btn-block" type="submit" th:text="#{login.btn}">Sign in</button>
		<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
		<!--根据模板引擎的定义来给请求带上参数-->
		<a class="btn btn-sm" th:href="@{/index.html(l='zh_CN')}">中文</a>
		<a class="btn btn-sm" th:href="@{/index.html(l='en_US')}">English</a>
	</form>

	</body>

</html>